package dice.sinanya.entity;

import java.util.Objects;

public class EntityCocList {
    int id;
    String jobName;
    int min;
    int max;
    String skill;
    int othor;
    String skillValue;
    int score;

    public EntityCocList(int id, String jobName, int min, int max, String skill, int othor, String skillValue) {
        this.id = id;
        this.jobName = jobName;
        this.min = min;
        this.max = max;
        this.skill = skill;
        this.othor = othor;
        this.skillValue = skillValue;
        this.score = 0;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof EntityCocList)) return false;
        EntityCocList cocList = (EntityCocList) o;
        return getId() == cocList.getId() &&
                getMin() == cocList.getMin() &&
                getMax() == cocList.getMax() &&
                getOthor() == cocList.getOthor() &&
                getScore() == cocList.getScore() &&
                getJobName().equals(cocList.getJobName()) &&
                getSkill().equals(cocList.getSkill()) &&
                getSkillValue().equals(cocList.getSkillValue());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getJobName(), getMin(), getMax(), getSkill(), getOthor(), getSkillValue(), getScore());
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public int getMin() {
        return min;
    }

    public void setMin(int min) {
        this.min = min;
    }

    public int getMax() {
        return max;
    }

    public void setMax(int max) {
        this.max = max;
    }

    public String getSkill() {
        return skill;
    }

    public void setSkill(String skill) {
        this.skill = skill;
    }

    public int getOthor() {
        return othor;
    }

    public void setOthor(int othor) {
        this.othor = othor;
    }

    public String getSkillValue() {
        return skillValue;
    }

    public void setSkillValue(String skillValue) {
        this.skillValue = skillValue;
    }

    @Override
    public String toString() {
        return score + "|" + id + "|" + jobName + "|" + min + "-" + max + "|" + skillValue + "|" + skill + "|" + othor;
    }
}
